<!DOCTYPE html>
<html>
  <head>
    <title>书签编辑</title>
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="content-type" content="text/html; charset=UTF-8">
	<#include "/admin/include/bootstrap.ftl">
  </head>
  <body>
  <div  style="margin-top:60px;">
  	<form class="form-horizontal" method="post" action="${admin_blogprefix}/admin/save_bookmark.do" id="ar_editform">
	  <div class="form-group">
	    <label for="inputEmail3" class="col-sm-2 control-label">名称</label>
	    <div class="col-sm-2">
	     <input type="hidden" name="id" value="${book.id!}"/>
	      <input type="text" class="form-control" name="bookmarksName" placeholder="请输入书签名称" value="${book.bookmarksName!}">
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputPassword3" class="col-sm-2 control-label">类型</label>
	    <div class="col-sm-2">
	     	 <select class="form-control" name="bfid">
				  <@BookMarkFolder websiteid="${AdminWebSite.id}">
					  <#list bookmarkfolder_lis as bookfolder>
						<option value="${bookfolder.id}" 
						<#if book.bookmarksFolder?? && bookfolder.id==book.bookmarksFolder.id>
						selected="selected"
						</#if>
						>${bookfolder.bookmarksName}</option>
					</#list>
				</@BookMarkFolder> 
		</select>
	    </div>
	  </div>
	  
	  <div class="form-group">
	    <label for="inputEmail3" class="col-sm-2 control-label">地址</label>
	    <div class="col-sm-5">
	      <input type="text" class="form-control" name="bookmarksHref" placeholder="请输入书签地址" value="${book.bookmarksHref!}">
	    </div>
	  </div>
       
	  
	<div class="form-group">
	    <label for="inputEmail3" class="col-sm-2 control-label">排序</label>
	    <div class="col-sm-2">
	      <input type="text" class="form-control" name="bookmarksOrder" placeholder="书签显示排序" value="${book.bookmarksOrder!}">
	    </div>
	</div>
	
	<div class="form-group">
	    <label for="inputPassword3" class="col-sm-2 control-label"></label>
	    <div class="col-sm-8">
	      <button type="submit" class="btn btn-primary" >发布</button>
	    </div>
	  </div>
  </div>
</form>
  </body>
  <script type="text/javascript">
  $('#ar_editform').bootstrapValidator({
	    message: 'This value is not valid',
	    feedbackIcons: {
	        valid: 'glyphicon glyphicon-ok',
	        invalid: 'glyphicon glyphicon-remove',
	        validating: 'glyphicon glyphicon-refresh'
	    },
	    fields: {
	    	bookmarksName: {
	            message: '名称不合规则!',
	            validators: {
	                notEmpty: {
	                    message: '请输入名称！'
	                }
	            }
	        },
	        bookmarksHref: {
	            message: '不合规则!',
	            validators: {
	                notEmpty: {
	                    message: '请输入排序号！'
	                },uri: {
	                    message: '只能是URL地址!'
	                }
	            }
	        },
	        bookmarksOrder: {
	            message: '不合规则!',
	            validators: {
	                notEmpty: {
	                    message: '请输入排序号！'
	                },regexp: {
	                    regexp: /^[0-9]*$/,
	                    message: '只能是数字'
	                }
	            }
	        }
	    
	    }
	});
  </script>
</html>
